package com.css.landslide.risk.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.css.influence.entity.SettingSeismicInfluenceflied;
import com.css.landslide.risk.entity.LandslideRisk;
import com.css.landslide.risk.entity.LandslideRiskLevel;
import com.css.landslide.risk.param.DatasourceBaseParam;
import com.css.landslide.risk.param.LandslideParam;
import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author dingling
 * @desc 滑坡危险性
 * @date 2024-09-26 16:19
 **/
public interface LandslideRiskService extends IService<LandslideRisk> {

    /**
     * 查询省滑坡数据
    **/
    List<LandslideRisk> selectRiskLandslideProvince(DatasourceBaseParam dsEntity, String geom);

    int selectCount(DatasourceBaseParam dsEntity);

    /**
     *通用滑坡数据
    **/
    List<LandslideRisk> selectRiskLandslide(String geom);

    /**
     * 根据地震id计算滑坡危险性
    **/
    void calculateLandslideRisk(LandslideParam riskLevel, Channel channel, Message message);

    String calculateLandslideRiskManual(LandslideParam riskLevel);


    /**
     * 计算危险等级  （公式）
     **/

    LandslideRiskLevel calculateRisk(List<SettingSeismicInfluenceflied> influences, LandslideRisk landslide);

    //LandslideRiskLevel calculateRisk(List<SettingSeismicInfluenceflied> influences, Integer i,  LandslideRisk landslide);

    /**
     * 计算危险等级  （公式）
    **/
    BigDecimal doCalculateRisk(SettingSeismicInfluenceflied influence, LandslideRisk landslide);

    List<SettingSeismicInfluenceflied> getInfluenceList(LandslideParam dsEntity);

}
